
<extend name="./masterHome" />
<block name="content">

</div>
<!--头部结束-->
<!--中间开始-->
<div id="content">
    <form action="" method="post">


        <div class="car main">
            <div class="carshop">
                <div class="cartitle">
                    <div class="carcheck">
                        <div class="checkbox">
                            <span class="check checkon" id="allcheck"></span>

                        </div>
                        全选</div>
                    <div class="carname">商品名称</div>
                    <div class="carmoney">单价</div>
                    <div class="carnum">数量</div>
                    <div class="carcount">小计</div>
                    <div class="carhandle">操作</div>
                </div>
                <foreach name="_SESSION['cart']['goods']" key="k" item="v">

                <div class="shopcontent" key="{$k}">
                    <div class="shopcheck"><div class="checkbox">
                        <span class="check checkon " key="{$k}"></span>
                        <input type="checkbox" name='checkbox' class="checkhide"/>
                    </div></div>
                    <div class="shopname">
                        <div class="carimg">
                            <a href=""><img src="__ROOT__/{$v['options']['img']}"/></a>
                        </div>
                        <p>
                            <a href="#">{$v['name']}</a>
                            <foreach name="v['options']['options']" key='kk' item='vv'>
                            <span>{$kk}:{$vv}</span>

                            </foreach>
                        </p>
                    </div>
                    <div class="shopmoney">{$v['price']}</div>
                    <div class="shopnum">

                        <a href="javascript:;" class="num_l">-</a>
                        <input type="text" class="prevnum" value="{$v['num']}" />
                        <a href="javascript:;" class="num_r">+</a>

                    </div>


                    <div class="shopcount">{$v['total']}</div>
                    <div class="shophandle"><span class="key">x</span></div>
                    <input type="hidden" value="{$k}" class="wzq_goodss">
                    <input type="hidden" class="countnum" value="{$v['options']['count']}">
                </div>
                </foreach>
            </div>

            <div class="jiesuan">
                <div class="jixu"><a href="">继续购物</a></div>
                <div class="gongji">共计<span>0</span>件商品</div>
                <div class="heji">合计<span>0</span></div>
                <div class="gou">
                    <input type="button"  value="去结算" id="gouwu"/>
                </div>

            </div>

        </div>
        <!--//********************************点击购买************************************-->
        <script>
            $(function () {
                $('#gouwu').click(function () {
                    var  len =$('.checkon:not("#allcheck")');
                    var gid='';
                    $.each (len,function (res) {
                        // implode()

                        gid+=$(this).attr('key')+','
                    })

                    location.href="{:u('home/accounts/index')}"+'?gid='+gid;
                });
            })
        </script>



    </form>


</div>
</block>
